package cn.ssm.service.serviceImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.ssm.dao.ScheduleMapper;
import cn.ssm.pojo.Schedule;
import cn.ssm.service.ScheduleService;

/**
 * 
 * 排片表业务实现类
 * 
 * @author aihui
 *
 */
@Service
public class ScheduleServiceImpl implements ScheduleService {
	@Autowired
	ScheduleMapper scheduleMapper;

	// 添加排处表信息
	public int addSchedule(Schedule schedule) {

		return scheduleMapper.addSchedule(schedule);
	}

	// 删除排片表信息
	@Override
	public int delSchedule(Map<String, Object> map) {
		return scheduleMapper.delSchedule(map);
	}

	// 修改排片表信息
	@Override
	public int updateSchedule(Map<String, Object> map) {
		return scheduleMapper.updateSchedule(map);
	}

	// 查询排片表信息
	@Override
	public List<Schedule> getScheduleList(Map<String, Object> map) {
		return scheduleMapper.getScheduleList(map);
	}

	//根据排片id查询
	@Override
	public Schedule getScheduleById(Integer scheduleId) {
		return scheduleMapper.getScheduleById(scheduleId);
	}
}
